package com.fei.bean;


import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

import javax.validation.constraints.NotBlank;
import javax.validation.constraints.Pattern;
import javax.validation.constraints.Size;


@Data
@NoArgsConstructor
@AllArgsConstructor
public class AdminBean {

    @NotBlank(message = "号码不可以为空")
    @Pattern(regexp = "^[0-9]{11,11}$",message = "请输入数字11位号码")
    public String phone;

    @NotBlank(message = "名字不可以为空")
    @Size(max = 12,min = 6,message = "名字长度大于6小于12")
    private String name;

    @NotBlank(message = "密码不可以为空")
    @Size(max = 12,min = 6,message = "密码长度大于6小于12")
    private String password;
    private Integer role;


}
